package some.point.dao;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;

import some.point.domain.AdminPointCommand;


@Component
public class AdminPointDaoImpl extends SqlSessionDaoSupport implements AdminPointDao{

	@Override
	public List<AdminPointCommand> adminPointList() {
		List<AdminPointCommand> list = getSqlSession().selectList("AdminPointDao.pointList");
		return list;
	}

	@Override
	public void updateAdminPoint(AdminPointCommand adminPoint) {
		getSqlSession().update("AdminPointDao.updatePoint", adminPoint);
		
	}

	@Override
	public int howPoint(String reason) {
		return getSqlSession().selectOne("AdminPointDao.howPoint", reason);
	}

}
